<template>
	<view><!-- <timeSelect v-if="isShow" @close="close()"></timeSelect> -->
	  <pw v-if="isShowPw" @closePwPage="closePwPage"></pw>
	</view>
</template>

<script>
// import {test} from './test.js'
import pw from '../../components/xjbg/popupWatch.vue'
import timeSelect from '../../components/time-select/time-select.vue';
export default {
	components: {
		timeSelect,
		pw,
	},
	data() {
		return {
			isShow: true,
			screenObj: {
				//上传参数
				isAsc: 'desc', //排序(asc:正序,desc:倒序))
				region: '', //区域，街道
				taskType: '', //零工类型，0计时，1计件，2计天
				orderByColumn: '', //默认排序，0离我最近，1最新发布，2诚信值降序
				sex: '', //0男,1女，2性别不限
				startReward: '', //起薪
				endReward: '', //上限
				pageNum: 0,
				pageSize: 40,
				status: 3, //上架的工作
				statusIn: '3', //上架的,下架的，待结算
				lat: '',
				lng: '',
				token: ''
			},
			isShowPw:true,
		};
	},
	methods: {
		closePwPage(){
			this.isShowPw=false
		},
		close() {
			this.isShow = false;
		},
		async test() {
			this.screenObj.lat = uni.getStorageSync('location')[0];
			this.screenObj.lng = uni.getStorageSync('location')[1];
			this.screenObj.name = this.word;
			this.screenObj.status = 3;
			this.screenObj.statusIn = '3';
			// 以工作开始时间为顺序
			if (!this.screenObj.orderByColumn) {
				this.screenObj.orderByColumn = 'startTime';
				this.screenObj.isAsc = 'asc';
			}
			// 如果没有定位默认义乌

			if (this.screenObj.region == '') {
				this.screenObj.region = '330782';

				// if (uni.getStorageSync('userId')) {
				// 	this.screenObj.token = uni.getStorageSync('userId');
				// } else {
				// 	this.screenObj.token = '';
				// }
			}
			let res = await this.$fetch(this.$api.task_list, this.screenObj, 'POST');
			if (res.code)
				return uni.showToast({
					title: res.msg,
					icon: 'none'
				});
		},
		aaa(){
			(function(a, b, c, d, e, j, s) {
				console.log('a1',a, b, c, d, e, j, s)
			    a[d] = a[d] || function() {
			        (a[d].a = a[d].a || []).push(arguments)
			    };
			    j = b.createElement(c),
			        s = b.getElementsByTagName(c)[0];
			    j.async = true;
			    j.charset = 'UTF-8';
			    j.src = 'https://static.meiqia.com/widget/loader.js';
			    s.parentNode.insertBefore(j, s);
			})(window, document, 'script', '_MEIQIA');
			_MEIQIA('entId', 'e192bcdba0437d9578824e7176146212');
		},
	},
	mounted() {},
	onShow() {
		setTimeout(()=>{
				uni.setStorageSync('wxTempTrade',plus.runtime.arguments)
				console.log('plus.runtime.arguments', plus.runtime.arguments)
			},10)
		// this.test();
		this.aaa()
	}
};
</script>

<style lang="less" scoped>
.test {
}
</style>
